package com.fingard.dsp.bank.reqrespobj.currencyexchange.detail;

import com.fingard.dsp.bank.reqrespobj.single.detail.ReqPayRecDetail;
import com.fingard.text.StringHelper;
import com.fingard.xml.XElement;

/**
 * Created by Lewis on 2017/9/23.
 * 结汇购汇请求信息实体类
 */
public class ReqExchangeRecDetail extends ReqPayRecDetail{
    //付方银行区域代码
    public String payAreaCode;
    //收方银行区域代码
    public String recAreaCode;
    //付方组织机构代码
    public String payOrgCode;
    //付方组织机构类型 1-中资机构,2-外资机构
    public String payOrgType;
    //收方国别
    public String recCountryCode;
    //联系人
    public String contactPerson;
    //联系电话
    public String contactNum;
    //外汇局批件号/备案表号/业务编号
    public String businessNum;
    //结购汇类别：501：贸易项下购汇，502：非贸易项下购汇，503：资本项下购汇，601：贸易项下结汇，602：非贸易项下结汇，603：资本项下结汇
    public String exchangeCategory;
    //交易编码
    public String transCode;
    //结购汇类型代码
    public String exchangeType;

    public ReqExchangeRecDetail(XElement p_xelement, String p_transType,String p_bankCode) throws Exception {
        super(p_xelement,p_transType,p_bankCode);
        askNumber = p_xelement.getSingleText("ReqSeqID");
        abstractATS = p_xelement.getSingleText("PostScript");
        if (StringHelper.isNullOrEmpty(purpose)) {
            purpose = p_xelement.getSingleTextNotNull("Memo");
        }
        payAreaCode = p_xelement.getSingleTextNotNull("PayAreaCode");
        recAreaCode = p_xelement.getSingleTextNotNull("RecAreaCode");
        payOrgCode = p_xelement.getSingleTextNotNull("PayOrgCode");
        payOrgType = p_xelement.getSingleTextNotNull("PayOrgType");
        recCountryCode = p_xelement.getSingleTextNotNull("RecCountryCode");
        contactPerson = p_xelement.getSingleTextNotNull("ContactPerson");
        contactNum = p_xelement.getSingleTextNotNull("ContactNum");
        businessNum = p_xelement.getSingleTextNotNull("BusinessNum");
        exchangeCategory = p_xelement.getSingleTextNotNull("ExchangeCategory");
        transCode = p_xelement.getSingleTextNotNull("TransCode");
        exchangeType = p_xelement.getSingleTextNotNull("ExchangeType");
    }
}
